package com.wgt;

/**
 * Created by wgt on 2017/5/31.
 */
public class Bubsort {

    public static void main(String args[]){
        int[] array = new int[]{
                234,123,435,546,7865,12,234,435
        };

        for (int i=0;i<array.length;i++){
            for (int j=i+1;j<array.length;j++){
                if (array[i]>array[j]){
                    int temp =array[i];
                    array[i] =array[j];
                    array[j]=temp;
                }
            }
        }
        for (int i:array){
            System.out.println(i);
        }
    }
}
